import { EntitySchema } from '@mikro-orm/core';

export class TypechoPaykey {
  id!: number;
  value?: string;
  price?: number = 0;
  status?: number = 0;
  created?: number = 0;
  uid?: number = -1;
}

export const TypechoPaykeySchema = new EntitySchema({
  class: TypechoPaykey,
  properties: {
    id: { primary: true, type: 'number' },
    value: { type: 'string', length: 255, nullable: true },
    price: { type: 'number', nullable: true, default: 0 },
    status: { type: 'number', nullable: true, default: 0 },
    created: { type: 'number', nullable: true, default: 0 },
    uid: { type: 'number', nullable: true, default: -1 },
  },
});
